angular.module('wheresmyapi', ['ngResource']).factory('User', function($resource) {
	var User = $resource('http://128.61.104.203' + '/users/:id',
		{}, {update: { method: 'PUT' }}
	);
	 
	User.prototype.update = function(cb) {
		return User.update({id: this.id},
		angular.extend({}, this, {id:undefined}), cb);
	};
	 
	User.prototype.destroy = function(cb) {
		return User.remove({id: this.id}, cb);
	};
	 
	return User;
});